/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-04-27
 * Time: 21:32
 */
//鸭子又可以跑又可以在水里游还能飞~
public class Duck extends Animal implements  IRunning,ISwimming,IFlying {
    public Duck(String name) {
        super(name);
    }

    @Override
    public void run() {
        System.out.println(this.name + "在地上跑~");
    }

    @Override
    public void swim() {
        System.out.println(this.name + "在水里浮着~");
    }

    @Override
    public void fly() {
        System.out.println(this.name + "在低空中挥动翅膀~");
    }
}